package com.hf.work04;

/**
 * 英语系
 * @author Lenovo-Healer
 */
public class EnglishDepartment extends Student{
    /**
     * 演讲
     */
    private double lectrure;

    /**
     * 综合成绩
     */
    @Override
    public double sumScore() {
        return this.getLectrure() * 0.5 + this.getStuFinal() * 0.25 + this.getStuMiddle() * 0.25;
    }
    /**
     * 综合成绩-Double
     */
    /*@Override
    public double sumScore() {
        Double score = null;
                score = this.getLectrure() * 0.5 + this.getStuFinal() * 0.25 + this.getStuMiddle() * 0.25;

        return score == 0.0 ? null : score;
    }*/

    public EnglishDepartment() {
    }
    //有参构造


    public EnglishDepartment(int stuNo, String stuName, String stuSex, int stuAge, double stuFinal, double stuMiddle, double lectrure) {
        super(stuNo, stuName, stuSex, stuAge, stuFinal, stuMiddle);
        this.lectrure = lectrure;
    }

    public double getLectrure() {
        return lectrure;
    }

    public void setLectrure(double lectrure) {
        this.lectrure = lectrure;
    }
}
